package com.chen.Main;

import com.chen.pojo.TextEditor;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TextMain {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("Beans.xml");
        TextEditor textEditor = (TextEditor)context.getBean("textEditor");
        System.out.println(textEditor.getName());
        System.out.println("=======");
        TextEditor textEditor1 = (TextEditor)context.getBean("textEditor1");
        System.out.println(textEditor1.getName());
        System.out.println("=======");
        TextEditor textEditor2 = (TextEditor)context.getBean("textEditor2");
        System.out.println(textEditor2.getName());
    }
}
